home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / lldemo / lldemo.shr / ROSETTA.EXE / ROSETTA.DXR / 00571_button handling scripts.ls < prev    next >
Encoding:
Text File  |  1996-06-24  |  720 b   |  28 lines

  1. on pictButton theSprite
  2.   set theCast to the castNum of sprite theSprite
  3.   repeat while the stillDown
  4.     if rollOver(theSprite) then
  5.       set the castNum of sprite theSprite to theCast + 1
  6.       updateStage()
  7.       next repeat
  8.     end if
  9.     set the castNum of sprite theSprite to theCast
  10.     updateStage()
  11.   end repeat
  12.   if rollOver(theSprite) then
  13.     set the castNum of sprite theSprite to theCast + 1
  14.     updateStage()
  15.     return 1
  16.   else
  17.     set the castNum of sprite theSprite to theCast
  18.     updateStage()
  19.     return 0
  20.   end if
  21. end
  22.  
  23. on doMenuPress x
  24.   spriteBox(16, the left of sprite x, the top of sprite x, the right of sprite x, the bottom of sprite x)
  25.   updateStage()
  26.   set the locH of sprite 16 to 1000
  27. end
  28.